package com.atung.parking.mapper;

import com.atung.parking.entity.BusLicensePlate;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.jdbc.repository.query.Query;

import java.util.List;

/**
 * @author Administrator
 */
@Mapper
public interface BusLicensePlateMapper extends BaseMapper<BusLicensePlate> {

    @Select("SELECT * FROM bus_license_plate " +
            "WHERE user_id = #{userId} " +
            "AND type = 0 " +
            "AND delectd = 0 " )
    List<BusLicensePlate> queryUseByUserId(@Param("userId") Long userId);
}
